package com.ymxk.timestar.activity.star;

import android.content.Context;
import android.graphics.Bitmap;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.ymxk.timestar.view.drag.widget.SquareMatrixLayout;
import com.ymxk.timestar.activity.R;

/**
 * Created by zxn on 2024/12/3.
 */
public class GlideImageLoader implements SquareMatrixLayout.ImageLoader{

    @Override
    public void onDisplayImage(Context context, ImageView imageView, String url) {
        //imageView.setImageResource(R.mipmap.ic_srar_a);
        /*Glide.with(context)
                .load(url)
                .apply(new RequestOptions().placeholder(R.drawable.ic_default_color)
                        .error(R.drawable.ic_default_color).diskCacheStrategy(DiskCacheStrategy.ALL))
                .into(imageView);*/
        /*Glide.with(context)
                .load(R.mipmap.ic_star_b)
                .apply(new RequestOptions().placeholder(R.drawable.ic_default_color)
                        .error(R.drawable.ic_default_color).diskCacheStrategy(DiskCacheStrategy.ALL))
                .into(imageView);*/
        Glide.with(context).load(url).into(imageView);
    }

    @Override
    public Bitmap getCacheImage(String url) {
        return null;
    }
}
